package com.web.graduationpro.model;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "apply")
@SuppressWarnings("all")
public class Apply {
	
	private Integer id;
	private String information;
	private String name;
	private String phone;
	private Member member;
	private InstrumentCourse instrumentCourse;
	
	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getInformation() {
		return information;
	}
	public void setInformation(String information) {
		this.information = information;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	@ManyToOne(cascade={CascadeType.PERSIST})
	@JoinColumn(name="member_id")
	public Member getMember() {
		return member;
	}
	public void setMember(Member member) {
		this.member = member;
	}
	@ManyToOne(cascade={CascadeType.PERSIST})
	@JoinColumn(name="instrument_course_id")
	public InstrumentCourse getInstrumentCourse() {
		return instrumentCourse;
	}
	public void setInstrumentCourse(InstrumentCourse instrumentCourse) {
		this.instrumentCourse = instrumentCourse;
	}
	
}
